import { ConfigService } from "@nestjs/config"

export const jwtConfig = {
    inject: [ConfigService], 
    global: true,
    useFactory: (configService: ConfigService) =>  ({
        secret: configService.get('JWT_SECRET'),
        signOptions: {
            expiresIn: configService.get('JWT_EXPIRES_TIME')
        }
    }) 
}